#ifndef CIRCUITCOMPONENT_H
#define CIRCUITCOMPONENT_H

#include <QGraphicsObject>
#include <QGraphicsItem>
#include <QPainter>

class CircuitComponent : public QGraphicsObject
{    
    Q_OBJECT
public:
    explicit CircuitComponent(QGraphicsItem *parent = nullptr);

    enum PortType { InputPort, OutputPort };

    virtual QPointF inputPort() const = 0;
    virtual QPointF outputPort() const = 0;
    QPointF portPosition(PortType type) const;

protected:
    QRectF boundingRect() const override;
};

#endif // CIRCUITCOMPONENT_H
